home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / adainc / a-retide.adb < prev    next >
Text File  |  1996-01-30  |  3KB  |  60 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                 GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS               --
  4. --                                                                          --
  5. --                   A D A . R E A L _ T I M E . D E L A Y S                --
  6. --                                                                          --
  7. --                                  B o d y                                 --
  8. --                                                                          --
  9. --                             $Revision: 1.11 $                             --
  10. --                                                                          --
  11. --       Copyright (c) 1991,1992,1993,1994, FSU, All Rights Reserved        --
  12. --                                                                          --
  13. -- GNARL is free software; you can redistribute it  and/or modify it  under --
  14. -- terms  of  the  GNU  Library General Public License  as published by the --
  15. -- Free Software  Foundation;  either version 2, or (at  your  option)  any --
  16. -- later  version.  GNARL is distributed  in the hope that  it will be use- --
  17. -- ful, but but WITHOUT ANY WARRANTY;  without even the implied warranty of --
  18. -- MERCHANTABILITY  or  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Gen- --
  19. -- eral Library Public License  for more details.  You should have received --
  20. -- a  copy of the GNU Library General Public License along with GNARL;  see --
  21. -- file COPYING.LIB.  If not,  write to the  Free Software Foundation,  675 --
  22. -- Mass Ave, Cambridge, MA 02139, USA.                                      --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. with System;
  27. --  Used for, Priority
  28.  
  29. with System.Task_Timer_Service;
  30. --  Used for, Timer
  31.  
  32. package body Ada.Real_Time.Delays is
  33.  
  34.    ------------------
  35.    -- Delay_Object --
  36.    ------------------
  37.  
  38.    protected body Delay_Object is
  39.       entry Wait (TS : Time_Span) when True is
  40.       begin
  41.          requeue System.Task_Timer_Service.Timer.Enqueue_Time_Span
  42.            with abort;
  43.          --  ??? This should not need with abort.
  44.       end Wait;
  45.    end Delay_Object;
  46.  
  47.    ------------------------
  48.    -- Delay_Until_Object --
  49.    ------------------------
  50.  
  51.    protected body Delay_Until_Object is
  52.       entry Wait (T : Time) when True is
  53.       begin
  54.          requeue System.Task_Timer_Service.Timer.Enqueue_Real_Time with abort;
  55.          --  ??? This should not need with abort.
  56.       end Wait;
  57.    end Delay_Until_Object;
  58.  
  59. end Ada.Real_Time.Delays;
  60.